#include <vector>

#include "kore2.h"

/**
 * @brief Scene Constructor
 *
 * Creates a camera for the scene and sets everything up.
 *
 * @param kore::KoreApplication* The application instance
 */
kore::Scene::Scene(kore::KoreApplication* app)
{
	this->camera = new kore::KoreCamera();

}

/**
 * @brief Scene Destructor
 *
 * ...
 */
kore::Scene::~Scene()
{
	delete this->camera;
}

/**
 *
 *
 *
 */
void kore::Scene::run()
{

}

/**
 * @brief SceneManager Constructor
 *
 * ...
 */
kore::SceneManager::SceneManager()
{

}

/**
 * @brief Adds a scene to a scenemanager
 *
 * ...
 *
 * @param kore::Scene* The scene to add
 */
void kore::SceneManager::addScene(kore::Scene* scene)
{
	this->m_scenes.push_back(scene);
}

/**
 *
 *
 *
 */
void kore::SceneManager::removeScene(Scene* scene)
{
	for (vector<Scene*>::iterator i = this->m_scenes.begin(); i != this->m_scenes.end(); i++)
	{
		if ((long)&scene == (long)*i)
		{
			this->m_scenes.erase(i);
			return;
		}
	}
}

/**
 *
 *
 *
 */
void kore::SceneManager::run()
{
	for (vector<Scene*>::iterator i = this->m_scenes.begin(); i != this->m_scenes.end(); i++)
	{
	}
}

/**
 *
 *
 *
 */
void kore::SceneManager::removeAllScenes()
{
	this->m_scenes.clear();
}


/**
 * @brief Sets the context parameters and makes them available to the
 * context.
 *
 * This function will not do any actual initializing. You need to attach the
 * context as the primary context in order for video to be initialized.
 *
 * @param Uint16 Width of window
 * @param Uint16 Height of window
 * @param Uint16 Bits per pixel
 */
void kore::KoreContext::setParameters(Uint16 width, Uint16 height, Uint16 bpp)
{
	this->m_width = width;
	this->m_height = height;
	this->m_bpp = (bpp)?16:bpp; // Default to 16bpp
}

/**
 * @brief Toggle fullscreen mode
 *
 * This will reinitialize the graphics as needed and toggle the fullscreen
 * mode of the specified API context, normally SDL.
 *
 * @param bool If true, the application will run fullscreen
 */
void kore::KoreContext::setFullscreen(bool fullscreen)
{

}
